﻿<h2>Radio group</h2>
<p id="radiogroup-event-initially-selected">
    <RadioGroup TValue="string" Name="colors" Inline="true" CheckedValue="@stringValue" CheckedValueChanged="@OnValueChanged">
        <Radio Class="radioR" TValue="string" Value="@("red")">Red</Radio>
        <Radio Class="radioG" TValue="string" Value="@("green")">Green</Radio>
        <Radio Class="radioB" TValue="string" Value="@("blue")">Blue</Radio>
    </RadioGroup>

    <span>The Value should update automatically as you click on radio</span>

    <span id="radiogroup-event-initially-selected-result">@stringValue</span>
</p>
@code {
    string stringValue = "green";

    private void OnValueChanged( string value )
    {
        stringValue = value;
    }
}
